home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
PROGMISC
/
FORTRAN1.LZH
/
COMPAR.FOR
< prev
next >
Wrap
Text File
|
1988-02-08
|
2KB
|
81 lines
SUBROUTINE COMPAR(TAR,L,TEST,MATCH)
C*
C* *******************************
C* *******************************
C* ** **
C* ** COMPAR **
C* ** **
C* *******************************
C* *******************************
C*
C* SUBPROGRAM :
C* STRING COMPARE
C*
C* AUTHOR :
C* ART RAGOSTA
C* MS 207-5
C* AMES RESEARCH CENTER
C* MOFFETT FIELD, CALIF 94035
C* (415)694-5578
C*
C* PURPOSE :
C* TO COMPARE TWO STRINGS TO LESS THAN THERE FULL LENGTH.
C*
C* INPUT ARGUMENTS :
C* TAR - THE (POTENTIALLY) SHORT STRING
C* L - THE NUMBER OF NON-BLANK CHARACTERS IN TAR
C* TEST - THE STRING TO TEST TAR AGAINST
C*
C* OUTPUT ARGUMENTS :
C* MATCH - SET TRUE IF TAR AND TEST MATCH FOR THE FIRST L
C* CHARACTERS, FALSE OTHERWISE
C*
C* INTERNAL WORK AREAS :
C* NONE
C*
C* COMMON BLOCKS :
C* NONE
C*
C* FILE REFERENCES :
C* NONE
C*
C* DATA BASE ACCESS :
C* NONE
C*
C* SUBPROGRAM REFERENCES :
C* NONE
C*
C* ERROR PROCESSING :
C* NONE
C*
C* TRANSPORTABILITY LIMITATIONS :
C* NONE
C*
C* ASSUMPTIONS AND RESTRICTIONS :
C* NONE
C*
C* LANGUAGE AND COMPILER :
C* ANSI FORTRAN 77
C*
C* VERSION AND DATE :
C* VERSION I.0 16-JAN-85
C*
C* CHANGE HISTORY :
C* 16-JAN-85 INITIAL VERSION
C*
C***********************************************************************
C*
CHARACTER *(*) TAR,TEST
LOGICAL MATCH
C
MATCH = .FALSE.
DO 10 I=1,L
IF (TAR(I:I) .NE. TEST(I:I))GO TO 20
10 CONTINUE
MATCH = .TRUE.
20 RETURN
END
C
C---END SEARCH
C